package com.zzjson.client;

import java.lang.reflect.Proxy;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2020 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.client</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2020年02月23日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class RpcProxyClient {
	public <T> T clientProxy(final Class<T> interfaceClass, final String host, final int port) {
		return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(), new Class[]{interfaceClass}, new RemoteInvocationHandler(host, port));
	}
}
